package com.dy.details.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.placeOrder.ConfirmOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ConfirmOrderMapper extends BaseMapper<ConfirmOrder> {

    @Select("<script>"+
            "select c.*,r.consignee rname,r.phone rphone,r.address raddress,r.detailed_address rdetailedAddress,c.total_amount rtotalAmount,\n" +
            "o.name oname,o.fw ofw,o.tp otp,o.sl osl,o.gg ogg,o.yd oyd,o.status ostatus from confirm_order c left join receiving_address r on c.rid=r.id left join \n" +
            "orders o on c.oid=o.id where oid=#{oid}" +
            "</script>")
    ConfirmOrder findDetailByOid(Long oid);
}
